clc;
clear;

syms x y
f = @(x,y) 4*y - 4*y.^2 - 4*x.*y;
fx = diff(f(x,y), x);
fy = diff(f(x,y), y);
fs = simplify(f(x,y));
fx = simplify(fx);
fy = simplify(fy);
disp(fs);
disp(fx);
disp(fy);

A = cell(2,1);
A{1} = @(x,y) x + y;
A{2} = @(x,y) x - y;
x_loc = @(x,y) x + y;
y_loc = @(x,y) x - y;
B = cell(2,1);
for i = 1:length(A)
    B{i} = @(x,y) A{i}(x_loc(x,y), y_loc(x,y));
end

B